package com.hello.system.service.impl;

import java.util.List;
import com.hello.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hello.system.mapper.FishDetectionResultMapper;
import com.hello.system.domain.FishDetectionResult;
import com.hello.system.service.IFishDetectionResultService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 鱼类检测结果详情Service业务层处理
 * 
 * @author hello
 * @date 2025-09-11
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class FishDetectionResultServiceImpl extends ServiceImpl<FishDetectionResultMapper, FishDetectionResult> implements IFishDetectionResultService 
{
    private final FishDetectionResultMapper fishDetectionResultMapper;

    /**
     * 查询鱼类检测结果详情
     * 
     * @param resultId 鱼类检测结果详情主键
     * @return 鱼类检测结果详情
     */
    @Override
    public FishDetectionResult selectFishDetectionResultByResultId(Long resultId)
    {
        return fishDetectionResultMapper.selectFishDetectionResultByResultId(resultId);
    }

    /**
     * 查询鱼类检测结果详情列表
     * 
     * @param fishDetectionResult 鱼类检测结果详情
     * @return 鱼类检测结果详情
     */
    @Override
    public List<FishDetectionResult> selectFishDetectionResultList(FishDetectionResult fishDetectionResult)
    {
        return fishDetectionResultMapper.selectFishDetectionResultList(fishDetectionResult);
    }

    /**
     * 新增鱼类检测结果详情
     * 
     * @param fishDetectionResult 鱼类检测结果详情
     * @return 结果
     */
    @Override
    public int insertFishDetectionResult(FishDetectionResult fishDetectionResult)
    {
        fishDetectionResult.setCreateTime(DateUtils.getNowDate());
        return fishDetectionResultMapper.insertFishDetectionResult(fishDetectionResult);
    }

    /**
     * 修改鱼类检测结果详情
     * 
     * @param fishDetectionResult 鱼类检测结果详情
     * @return 结果
     */
    @Override
    public int updateFishDetectionResult(FishDetectionResult fishDetectionResult)
    {
        fishDetectionResult.setUpdateTime(DateUtils.getNowDate());
        return fishDetectionResultMapper.updateFishDetectionResult(fishDetectionResult);
    }


    /**
     * 批量删除鱼类检测结果详情
     * 
     * @param resultIds 需要删除的鱼类检测结果详情主键
     * @return 结果
     */
    @Override
    public int deleteFishDetectionResultByResultIds(Long[] resultIds)
    {
        return fishDetectionResultMapper.deleteFishDetectionResultByResultIds(resultIds);
    }

    /**
     * 删除鱼类检测结果详情信息
     * 
     * @param resultId 鱼类检测结果详情主键
     * @return 结果
     */
    @Override
    public int deleteFishDetectionResultByResultId(Long resultId)
    {
        return fishDetectionResultMapper.deleteFishDetectionResultByResultId(resultId);
    }
}
